package cn.itguy.mobileguard;

import cn.itguy.mobileguard.activity.AboutActivity;
import cn.itguy.mobileguard.activity.ChooseSensorActivity;
import cn.itguy.mobileguard.activity.ConfigActivity;
import cn.itguy.mobileguard.activity.ContactActivity;
import cn.itguy.mobileguard.activity.GestureBuilderActivity;
import cn.itguy.mobileguard.activity.HelpActivity;
import cn.itguy.mobileguard.activity.MainActivity;
import cn.itguy.mobileguard.activity.SetPasswordActivity;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;

public class ActivityJumper {

	private static Intent intent;
	
	public static void toConfigActivity(Context context) {
		intent = new Intent(context, ConfigActivity.class);
		context.startActivity(intent);
	}

	public static void toIMobileGuardActivity(Context context) {
		intent = new Intent(context, MainActivity.class);
		context.startActivity(intent);
	}

	public static void toSetPasswordActivity(Context context) {
		intent = new Intent(context, SetPasswordActivity.class);
		context.startActivity(intent);
	}

	public static void toChooseSensorActivity(Context context) {
		intent = new Intent(context, ChooseSensorActivity.class);
		context.startActivity(intent);
	}

	public static void toIMobileGuardActivityFS(Context context) {
		intent = new Intent(context, MainActivity.class);
		intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		context.startActivity(intent);
	}

	public static void toChooseAudioActivity(Context context, int requestCode) {
		intent = new Intent(Intent.ACTION_GET_CONTENT);
		intent.setType("audio/*");
		intent.addCategory(Intent.CATEGORY_OPENABLE);
		((Activity) context).startActivityForResult(intent, requestCode);
	}

	public static void toContactActivity(Context context) {
		intent = new Intent(context, ContactActivity.class);
		context.startActivity(intent);
	}

	public static void toGestureBuilderActivity(Context context) {
		intent = new Intent(context, GestureBuilderActivity.class);
		context.startActivity(intent);
	}

	public static void toHelpActivity(Context context) {
		intent = new Intent(context, HelpActivity.class);
		context.startActivity(intent);
	}

	public static void toAboutActivity(Context context) {
		intent = new Intent(context, AboutActivity.class);
		context.startActivity(intent);
	}

}
